<!DOCTYPE html>

<head>
    <meta charset="UTF-8">
    <title>签约祛斑</title>
    <link rel="stylesheet" href="../css/mui.min.css">
    <meta name="viewport" content="width=device-width, initial-scale=1,maximum-scale=1,user-scalable=no">
    <script src="../js/mui.min.js"></script>
    <script src="../js/jquery.min.js" type="text/javascript" charset="utf-8"></script>
    <script type="text/javascript" src="http://res.wx.qq.com/open/js/jweixin-1.4.0.js"></script>
    <script src="../js/cookieutil.js" type="text/javascript" charset="utf-8"></script>
    <script src="../js/getUrlParam.js"></script>
    <script src="../js/payutils.js"></script>
    <style>
        input{
            width: 75%!important;
            font-size: 12px!important;
        }
        label{
            width: 23%!important;
            font-size: 12px!important;
            font-family:Microsoft YaHei,sans-serif;
            font-weight: normal;
        }
        label span{

            display:inline-block;
            vertical-align:middle;

        }
    </style>
</head>
<body style="margin-top: 0px">
<div class="mui-content" >
    <div class="headage"></div>
    <div class="mui-content-padded" style="height: 121px!important;">
        <img src="../images/qyqb.png" style="width:100%;text-align: center;height: 120px;"/>
    </div>

    <div class="container">
        <form class="mui-input-group">
            <div class="mui-input-row ">
                <label>类型:<span style="color: crimson;margin-top: 10px;">*</span></label>
                <input type="text" style="font-size: 12px" class=" mui-input" placeholder="" id="" value="签约祛斑" readonly="readonly">
            </div>
            <div class="mui-input-row ">
                <label>姓名:<span style="color: crimson;margin-top: 10px;">*</span></label>
                <input type="text" class=" mui-input-clear" placeholder="" id="username">
            </div>
            <div class="mui-input-row ">
                <label>电话:<span style="color: crimson;margin-top: 10px;">*</span></label>
                <input type="text" class=" mui-input-clear" placeholder="" id="phone">
            </div>
            <div class="mui-input-row ">
                <label>位置:<span style="color: crimson;margin-top: 10px;">*</span></label>
                <input type="text" class=" mui-input-clear" placeholder="" id="address">
            </div>

        </form>

        <div style="width: 100%;">
            <button type="button" class="mui-btn mui-btn-primary" id="saveUpload"  style="width: 80%;height: 35px;float: left;margin-left: 10%;margin-top: 20px;">提交申请</button>
            <label style="color: #8f8f94; font-size: 13px!important;text-align: center;width: 100%!important;float: left;">您选择了<a href="javascript:void(0);" style="color: #8190AE;">签约祛斑</a>服务，需要支付定金<span style="color: red;font-size: 18px;">&nbsp;400</span>元</label>
        </div>
    </div>

    <div class="footerpage">
    </div>
</div>
</body>


<script>
    $(function(){
        $(".headage").load("head.html");
        $(".footerpage").load("footer.html");
        /*公共部分
         * 导航栏
         * footer CopyRight
         */
        var  userid=getCookie('userid');
        if (userid==null||userid==undefined)
        {
            getindex();
        }else {
            $("#username").val(getCookie('username'));
            $("#phone").val(getCookie('mobile'));
            $("#address").val(getCookie('address'));

            $("#saveUpload").click(function () {
                var phone = $("#phone").val();
                var address = $("#address").val();
                var username = $("#username").val();
                if (username == "" || username == undefined) {
                    hideLoading();//隐藏后的回调函数
                    mui.toast('请输入你的姓名！');
                    return;
                }
                if (phone == "" || phone == undefined) {
                    mui.toast('请输入你的联系电话！');
                    return;
                } else {
                    var t = Isphone(phone);
                    if (t == false) {
                        mui.toast('联系电话格式不对！');
                        return;
                    }
                }
                if (address == "" || address == undefined) {
                    mui.toast('请输入你的联系地址！');
                    return;
                }
                mui.post('/Order/insertFull',
                    {
                        userid: userid,
                        phone: phone,
                        address: address,
                        username:username,
                        hetongmoney: 400
                    },
                    function (data) {
                        console.log(data);
                        if (data.code) {
                            mui.toast('资料提交成功请你等待经纪人上门服务！正在调用微信支付...');
                            getwxkey(data.object);
                        }
                    }, 'json'
                )
            });
        }
    });
</script>

